let v = require("../../data/xt/plot_economy_101f1578.json")
let arr = require("./toArr")(v).filter(Boolean)  // 0是空数组
let nameList = ["小卖部", "奶茶店", "水果店", "宠物店", "美容店", "寿司馆", "电影院", "健身房", "百货超市", "蛋糕店", "咖啡馆", "西餐厅", "婚庆点", "珠宝店", "体育馆", "星级酒店", "购物广场", "商业大楼", "综合网咖", "海鲜酒家", "物流中心", "私立医院", "金融大厦", "总裁大学", "科技园区", "招商大厅", "商业银行"]

let finalData = arr = arr.map((val, index) => {
	// ,需要忽略plantPrice: coin_to_release
	let {id, upgradePriceMultiplier: upgrade_price_multiplier, plantPrice: coin_to_release, upgradePrice: coin_to_update, baseProfit: base_income, growTime: duration} = val
	return {id, upgrade_price_multiplier, coin_to_update, store_name: nameList[index], level: 1, base_income, duration,coin_to_release}
})

let EmpireStore = require("../dbSync").Game.EmpireStore
// let toTable = require("/mnt/my/hwx/vhost/study/study/table.js")
async function test(arrs) {
	console.log(arrs)
	for (let i = 18; i < 27; i++) {
		let store = EmpireStore.build(arrs[i], {isNewRecord: true})
		let res = await store.save()
		// console.log(JSON.stringify(res))
	}
}
test(finalData)
//../data/xt/plot_economy_101f1578.json
// node dbServer/save1/saveuM.js